As a built-in and most commonly used debugger, GDB is obviously irrefutable. Familiar with GDB is like all Linux developers suggest using vim, which is a "strange" plot.
Source code for testing.
#include int test(int a, int b){ int c = a + b;
The use and summary of GDB debug commandsGDB is a command-line debugging tool in a UNIX environment. If you need to use the GDB debugger, add the-G option to GCC. The following command section is a simplified version, such as using L instead of list
command-line debugging tools in a UNIX environment: gdbIf you need to use the GDB debugger, add the-G option to GCC.The following command section is a simplified version, such as using L instead of list and so on.1. Basic Commands1) Enter GDB #gdb
1. Basic command
1 Enter GDB #gdb test
Test is the program to debug, generated by GCC test.c-g-o test. Enter the back-prompt into (GDB).
2) View Source (GDB) L
The source code will be the line number hint.
If you need to see the functions
1. Basic commands
1) Go to GDB # gdb test
Test is the program to be debugged. It is generated by gcc test. c-g-o test. Enter the prompt and change to (gdb ).
2) view the source code (gdb) l
The source code prompts the line number.
If you need to
1. Basic commands1) Enter GDB #gdb testTest is the program to debug, generated by GCC test.c-g-o test. Enter the post prompt into (GDB).2) View Source (GDB) LSource code will be a line number hint.If you need to see the functions defined in other
Http://blog.chinaunix.net/uid-23193900-id-3184605.html1. What is program debugging? The purpose of the program debugging is to find out the hidden faults in the program, correct those abnormal instructions, so that the program can work properly. 2.
Debugging a Python process with gdb sometimes we want to debug a running Python process, or a Python process coredump. For example, now encountered a MOD_WSGI process zombie, do not accept the request, want to see exactly what line of Python code to
debugging the Python process with gdbPosted in Python on 2011-10-12 10:08:50, tagged with debug, gdb, Python.
Sometimes we want to debug a running Python process, or a coredump of a python process. For example, a MOD_WSGI process is now dead and
C/C ++ development in Unix-like environments,CodeDebugging is troublesome. the most primitive addition, tracking, and debugging are very time-consuming. Especially for a large project, debugging is very difficult when the number of lines of code
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.